package com.ktjiaoyu.service.impl;

import com.ktjiaoyu.entity.StorageRecord;
import com.ktjiaoyu.mapper.StorageRecordMapper;
import com.ktjiaoyu.mapper.SysUserMapper;
import com.ktjiaoyu.service.StorageRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("storageRecordService")
public class StorageRecordServiceImpl implements StorageRecordService {
    @Autowired
    private StorageRecordMapper storageRecordMapper;


    @Override
    public List<StorageRecord> getStorageRecordList(StorageRecord storageRecord) {
        return storageRecordMapper.getStorageRecordList(storageRecord);
    }

    @Override
    @Transactional
    public int addStorageRecord(StorageRecord storageRecord) {
        return storageRecordMapper.addStorageRecord(storageRecord);
    }

    @Override
    @Transactional
    public int updateStorageRecord(StorageRecord storageRecord) {
        return storageRecordMapper.updateStorageRecord(storageRecord);
    }

    @Override
    @Transactional
    public int deleteStorageRecord(Long id) {
        return storageRecordMapper.deleteStorageRecord(id);
    }
}
